Optimal. Leaf size=68 \[ \frac{a \tan ^3(c+d x)}{3 d}+\frac{a \tan (c+d x)}{d}+\frac{a \sec ^3(c+d x)}{3 d}+\frac{a \sec (c+d x)}{d}-\frac{a \tanh ^{-1}(\cos (c+d x))}{d} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0874933, antiderivative size = 68, normalized size of antiderivative = 1., number of steps used = 7, number of rules used = 5, integrand size = 25, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.2, Rules used = {2838, 2622, 302, 207, 3767} \[ \frac{a \tan ^3(c+d x)}{3 d}+\frac{a \tan (c+d x)}{d}+\frac{a \sec ^3(c+d x)}{3 d}+\frac{a \sec (c+d x)}{d}-\frac{a \tanh ^{-1}(\cos (c+d x))}{d} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 2838
Rule 2622
Rule 302
Rule 207
Rule 3767
Rubi steps
\begin{align*} \int \csc (c+d x) \sec ^4(c+d x) (a+a \sin (c+d x)) \, dx &=a \int \sec ^4(c+d x) \, dx+a \int \csc (c+d x) \sec ^4(c+d x) \, dx\\ &=\frac{a \operatorname{Subst}\left (\int \frac{x^4}{-1+x^2} \, dx,x,\sec (c+d x)\right )}{d}-\frac{a \operatorname{Subst}\left (\int \left (1+x^2\right ) \, dx,x,-\tan (c+d x)\right )}{d}\\ &=\frac{a \tan (c+d x)}{d}+\frac{a \tan ^3(c+d x)}{3 d}+\frac{a \operatorname{Subst}\left (\int \left (1+x^2+\frac{1}{-1+x^2}\right ) \, dx,x,\sec (c+d x)\right )}{d}\\ &=\frac{a \sec (c+d x)}{d}+\frac{a \sec ^3(c+d x)}{3 d}+\frac{a \tan (c+d x)}{d}+\frac{a \tan ^3(c+d x)}{3 d}+\frac{a \operatorname{Subst}\left (\int \frac{1}{-1+x^2} \, dx,x,\sec (c+d x)\right )}{d}\\ &=-\frac{a \tanh ^{-1}(\cos (c+d x))}{d}+\frac{a \sec (c+d x)}{d}+\frac{a \sec ^3(c+d x)}{3 d}+\frac{a \tan (c+d x)}{d}+\frac{a \tan ^3(c+d x)}{3 d}\\ \end{align*}
Mathematica [A] time = 0.116491, size = 85, normalized size = 1.25 \[ \frac{a \left (\frac{1}{3} \tan ^3(c+d x)+\tan (c+d x)\right )}{d}+\frac{a \sec ^3(c+d x)}{3 d}+\frac{a \sec (c+d x)}{d}+\frac{a \log \left (\sin \left (\frac{1}{2} (c+d x)\right )\right )}{d}-\frac{a \log \left (\cos \left (\frac{1}{2} (c+d x)\right )\right )}{d} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.082, size = 82, normalized size = 1.2 \begin{align*}{\frac{2\,a\tan \left ( dx+c \right ) }{3\,d}}+{\frac{a\tan \left ( dx+c \right ) \left ( \sec \left ( dx+c \right ) \right ) ^{2}}{3\,d}}+{\frac{a}{3\,d \left ( \cos \left ( dx+c \right ) \right ) ^{3}}}+{\frac{a}{d\cos \left ( dx+c \right ) }}+{\frac{a\ln \left ( \csc \left ( dx+c \right ) -\cot \left ( dx+c \right ) \right ) }{d}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 1.17048, size = 99, normalized size = 1.46 \begin{align*} \frac{2 \,{\left (\tan \left (d x + c\right )^{3} + 3 \, \tan \left (d x + c\right )\right )} a + a{\left (\frac{2 \,{\left (3 \, \cos \left (d x + c\right )^{2} + 1\right )}}{\cos \left (d x + c\right )^{3}} - 3 \, \log \left (\cos \left (d x + c\right ) + 1\right ) + 3 \, \log \left (\cos \left (d x + c\right ) - 1\right )\right )}}{6 \, d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 1.67432, size = 348, normalized size = 5.12 \begin{align*} -\frac{4 \, a \cos \left (d x + c\right )^{2} + 3 \,{\left (a \cos \left (d x + c\right ) \sin \left (d x + c\right ) - a \cos \left (d x + c\right )\right )} \log \left (\frac{1}{2} \, \cos \left (d x + c\right ) + \frac{1}{2}\right ) - 3 \,{\left (a \cos \left (d x + c\right ) \sin \left (d x + c\right ) - a \cos \left (d x + c\right )\right )} \log \left (-\frac{1}{2} \, \cos \left (d x + c\right ) + \frac{1}{2}\right ) - 2 \, a \sin \left (d x + c\right ) + 4 \, a}{6 \,{\left (d \cos \left (d x + c\right ) \sin \left (d x + c\right ) - d \cos \left (d x + c\right )\right )}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.28876, size = 109, normalized size = 1.6 \begin{align*} \frac{6 \, a \log \left ({\left | \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right ) \right |}\right ) + \frac{3 \, a}{\tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right ) + 1} - \frac{15 \, a \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{2} - 24 \, a \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right ) + 13 \, a}{{\left (\tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right ) - 1\right )}^{3}}}{6 \, d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]